<template>
  <div id="app">
    <!-- <keep-alive v-if="isLoggedIn">
      <router-view v-if="$route.meta.keepAlive"></router-view>
    </keep-alive> -->
    <router-view></router-view>
  </div>
</template>

<script>
export default {
  name: "App",
  data() {
    return{}
  },

  created() {
    // 在页面刷新时将vuex里的信息保存到sessionStorage里
    // beforeunload事件在页面刷新时先触发
    //在全局路由再重新加载state
    window.addEventListener("beforeunload", () => {
      this.$message.info("刷新有可能造成数据丢失...");
      sessionStorage.setItem("store", JSON.stringify(this.$store.state));
      sessionStorage.setItem("routeParams", JSON.stringify(this.$route.params));
    });
  }
};
</script>

<style lang="scss">
.el-tree-node.is-current.is-expanded {
  color: #606266 !important;
}
.el-tree-node.is-current {
  color: #ffd04b !important;
}
.test .dialog-title {
  color: #409eff;
  font-weight: bold;
  font-size: 15px;
}
.test .el-table__row {
  cursor: pointer;
}
#app {
  font-family: "Avenir", Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
  height: 100%;
  overflow-x: hidden;
}
.el-breadcrumb__inner a,
.el-breadcrumb__inner {
  color: rgb(169, 172, 181) !important;
}

.experiment .el-tree-node__content {
  height: 35px;
  border-bottom: 1px solid rgb(230, 241, 253);
}

.experiment .el-tree-node:nth-child(2n) {
  background: #fbfbfb;
  border-top: 1px solid #efefef;
  border-bottom: 1px solid #efefef;
}
.experiment .el-tree-node__content:hover {
  background-color: rgb(236, 245, 255);
}
.experiment .el-tree-node__label {
  font-size: 10px;
}
.viewResults .el-tree-node__content {
  height: 35px;
  font-size: px;
  border-bottom: 1px solid rgb(230, 241, 253);
}
.viewResults .el-tree-node:nth-child(2n + 1) {
  background: #fbfbfb;
  border-top: 1px solid #efefef;
  border-bottom: 1px solid #efefef;
}
.viewResults .el-tree-node__content:hover {
  background-color: rgb(236, 245, 255);
}
.viewResults .el-tree-node__label {
  font-size: 15px;
}

.sideBar .el-menu-item-group__title {
  display: none !important;
}
.sideBar .el-submenu__title {
  padding-left: 20px !important;
  height: 30px !important;
  line-height: 30px !important;
  font-size: 12px;
}

.sideBar .el-icon-arrow-down {
  display: none;
}
.el-table td.el-table__cell,
.el-table th.el-table__cell.is-leaf {
  border-bottom: none;
  padding: 3px 0;
}
.el-table {
  overflow: auto;
  .el-button {
    margin: 0;
    border: 0;
    background: initial;
  }
  .el-button:hover {
    background: #5b8bff;
    color: #f4f4f5;
  }
  .btn_success {
    color: #67c239;
  }
  .btn_primary {
    color: #5c89fe;
  }
  .btn_danger {
    color: #f76c6f;
  }
}
.el-table__header th,
.el-table__header tr {
  background-color: #eff3ff !important;
  color: #7b8390;
  border-top: 1px solid #dee1f2;
}
.el-table--striped .el-table__body tr.el-table__row--striped td.el-table__cell {
  background: #f9faff;
}
.el-tag.el-tag--light {
  background: #edf5ff;
  color: #5b8bff;
  border: solid 1px #5b8bff;
  height: 25px;
  line-height: 25px;
}

.program_details .button {
  display: none !important;
}

.studentManage .el-tree-node__content {
  height: 35px;
  font-size: px;
  border-bottom: 1px solid rgb(230, 241, 253);
}

.studentManage .is-expanded {
  background-color: rgb(236, 245, 255) !important;
}
.studentManage .el-tree-node:nth-child(2n) {
  background: #fbfbfb;
  border-top: 1px solid #efefef;
  border-bottom: 1px solid #efefef;
}
.studentManage .el-tree-node__content:hover {
  background-color: rgb(236, 245, 255);
}
.studentManage .el-tree-node__label {
  font-size: 17px;
}
/* 修改选择框的图标 */
.el-select .el-icon-arrow-up:before {
  content: "\e790" !important;
}
.el-input__suffix .el-input__icon {
  height: 100% !important;
  margin-top: 0 !important;
}
.el-popover {
  min-width: 0;
  .el-button {
    margin: 0;
    border: 0;
    color: #5b8bff;
    font-weight: bold;
    background: white;
  }
  .el-button:hover {
    background: #5b8bff;
    color: #fbfbfb;
  }
}
/* 搜索框样式--圆角及图标颜色 */
.el-icon-search {
  color: #5b8bff;
} /*
.el-input__inner{
border-radius: 50px;
 } */

.experimentList .el-dialog__header,
.container .el-dialog__header,
.experimentCreate .el-dialog__header,
.questionList .answer .el-dialog__header {
  background-color: #5b8bff;
  position: relative;
  height: 15px;
}
.experimentList .el-dialog__header span,
.container .el-dialog__header span,
.experimentCreate .el-dialog__header span,
.questionList .answer .el-dialog__header span {
  position: absolute;
  left: 10px;
  top: 10px;
  color: white;
}
.experimentList .el-dialog__headerbtn .el-dialog__close,
.container .el-dialog__headerbtn .el-dialog__close,
.experimentCreate .el-dialog__headerbtn .el-dialog__close,
.questionList .answer .el-dialog__headerbtn .el-dialog__close {
  color: white;
}
.experimentList .btn1,
.experimentCreate .btn1 {
  background-color: #4b8bff !important;
  color: white;
}
.experimentList .btn2,
.experimentList .btn2:hover {
  background-color: #a1bbf4;
  color: white;
}
</style>
